/*
 *  SequenceElement.h
 *  SoundController0002
 *
 *  Created by jiro on 11/09/14.
 *  Copyright 2011 jiro music. All rights reserved.
 *
 */

#pragma once

#include "../HarmonicSystem/SoundList.h"
#include "../HarmonicSystem/Sound.h"
#include "../../sc/SoundElement.h"
#include <vector>

namespace sc
{
namespace system0039
{
	///< SequenceElement has two frequency to present one note.
	///< the note duration is defined by their howl frequency.
	class SequenceElement
	{
	private:

		double frequencies[ 2 ];

		double dynamics;

		int repeatCount;

	public:

		SequenceElement();

		SequenceElement( sc::Note::MidiNumber number0, double harmonics0, sc::Note::MidiNumber number1, double harmonics1, double dynamics, int repeatCount );

		SequenceElement( sc::Note::MidiNumber number0, double harmonics0, sc::Note::MidiNumber number1, double harmonics1, double dynamics );

		//	expressing rest is this constructer's main purpose 
		SequenceElement( double frequency0, double frequency1, double dynamics );

		void SetRepeatCount( int count );

		sc::Note::MidiNumber GetMidiNumber() const;

		double GetFrequency( int index  ) const;

		double GetDynamics() const;

		int GetRepeatCount() const;

		double GetDuration( bool isRepeat ) const;

		::sc::hs::Chord ToChord() const;

	};

}
}
